<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>团购修改</h2>
    </div>
    <form action="{:U()}" method="post" enctype="multipart/form-data" class="form-horizontal">
        <input type="hidden" name='id' value="{$data.id}"/>
        <div class="form-item">
            <label class="item-label">活动名称</label>
            <div class="controls">
                <input type="text" class="text input-large" name="gpName" value="{$data.gpName}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">开始时间</label>
            <div class="controls">
                <input type="text" class="text input-large time" name="begindate" value="{$data.begindate|time_format}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">结束时间</label>
            <div class="controls">
                <input type="text" class="text input-large time" name="enddate" value="{$data.enddate|time_format}" >
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">支付结束时间</label>
            <div class="controls">
                <input type="text" class="text input-large time" name="payenddate" value="{$data.payenddate|time_format}" >
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">上传活动海报图片</label>
            <img src="{$data.fileUrl}" width="160" height="90">
            <div class="controls">
                需要替换图片：
                <input type="file" name="photo" />
            </div>
        </div>
        
        <div class="form-item">
            <button class="btn submit-btn" id="submit" type="submit" target-form="form-horizontal">保 存</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>

<block name="script">
     <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script type="text/javascript">
        highlight_subnav('{:U('GroupPurchase/index')}');
        
        $(function(){
            $('.time').datetimepicker({
                format: 'yyyy-mm-dd hh:ii:ss',
                language:"zh-CN",
                minView:2,
                autoclose:true
            });
            showTab();
        });
    </script>
    
</block>
